package qy.jalgotrade.eventprof;

import qy.jalgotrade.dataseries.BarDataSeries;

/**
 * Base class for event identification. You should subclass this to implement the event
 * identification logic.
 * 
 * @author c-geo
 *
 */
public abstract class Predicate {

	/**
	 * 
	 */
	public Predicate() {

	}

	/**
	 * determine if an event took place in the last bar (bards[-1]).
	 * 
	 * @param instrument Instrument identifier.
	 * @param bards      The BarDataSeries for the given instrument.
	 * @return boolean
	 */
	public abstract boolean eventOccurred(String instrument, BarDataSeries bards);
}
